fetchart: Fix downloading pre-sized thumbnails from CAA#6870
Open
tibequadorian wants to merge 1 commit into
Open
fetchart: Fix downloading pre-sized thumbnails from CAA#6870tibequadorian wants to merge 1 commit into
tibequadorian wants to merge 1 commit into
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6870 +/- ##
==========================================
- Coverage 75.63% 75.63% -0.01%
==========================================
Files 163 163
Lines 21317 21318 +1
Branches 3361 3361
==========================================
- Hits 16124 16123 -1
- Misses 4403 4404 +1
- Partials 790 791 +1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes issue in which thumbnails were rescaled locally instead of downloading pre-sized ones from CAA.
From the docs:
I noticed that the fetchart plugin didn't download the pre-sized thumbnails from CAA for some of my releases because the API didn't provide them under the keys "500" and "250" but instead "large" and "small". These are legacy keys but for some releases they're the only ones available so I wrote this fix to use them as a fallback.
Example
{ "images": [ { "types": [ "Front" ], "front": true, "back": false, "edit": 30140717, "image": "http://coverartarchive.org/release/d51434bc-fcb6-4fc0-864f-e1ab13a51de2/8891190287.png", "comment": "", "approved": true, "id": "8891190287", "thumbnails": { "large": "http://coverartarchive.org/release/d51434bc-fcb6-4fc0-864f-e1ab13a51de2/8891190287-500.jpg", "small": "http://coverartarchive.org/release/d51434bc-fcb6-4fc0-864f-e1ab13a51de2/8891190287-250.jpg" } } ], "release": "http://musicbrainz.org/release/d51434bc-fcb6-4fc0-864f-e1ab13a51de2" }